//
//  RITAppDelegate.mm.m
//
//  Created by Rua Haszard Morris on 12/02/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "RITAppDelegate.h"

@implementation RITAppDelegate

-(BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
{
   return NO;
}

-(void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
	NSDocumentController* myDocumentController = [NSDocumentController sharedDocumentController];
	
	if ([[myDocumentController recentDocumentURLs] count] > 0)
	{
      NSURL* recent1 = [[myDocumentController recentDocumentURLs] objectAtIndex:0];
      if ([[NSFileManager defaultManager] fileExistsAtPath:[recent1 path]])
         [myDocumentController openDocumentWithContentsOfURL:recent1 display:YES error:nil];
	}	

}

@end
